<?php
/**
 * quick_curd
 * ============================================================================
 * 版权所有 2024-2099 wltx666.com，并保留所有权利。
 * 网站地址: https://wltx666.com
 * ============================================================================
 * Author: 草上飞
 * Email: wltx@alipay168.cn
 * QQ: 2719875001
 * Date: 2024/12/15
 * 描述:
 */

namespace app\admin\controller;

use app\BaseController;
use app\model\admin\Admin;
use app\model\admin\AdminLoginLog;
use app\result\admin\AdminResult;
use app\service\JWTService;
use think\facade\Config;
use think\facade\View;

class Login extends BaseController
{

    public function index()
    {
        return View::fetch('login/login');
    }

    // 登录
    public function login()
    {
        data_exit_json((new AdminResult())->login(input('post.')));
    }

    // 退出
    public function logout()
    {
        data_exit_json((new AdminResult())->logout());
    }
}
